﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfDealerRegOne.aspx.cs" Inherits="msBsc.WebUi.wfDealerRegOne" %>

<!DOCTYPE HTML>
<html>
<head id="Head1" runat="server"> 
    <title>商户入驻申请</title> 
    <link rel="shortcut icon" href="/themes/Style1/Image/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/??themes/Style1/StyleQt.css,themes/Style1/reg2.css," />  
    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jBPage.js,themes/Style1/jsQt.js,jqPlugin/laydate/laydate.js" type="text/javascript"></script>
    <!--head fix rgn--> 
    <script type="text/javascript">
        $(window).load(function () {
            $("#dplPROVINCE_ID").change(function () {
                var _jsParam = new jsonRow();
                _jsParam.AddCell("ACTION", "dplPROVINCE_ID_change");
                _jsParam.AddCell("PROVINCE_ID", $(this).val());
                ajaxComm(_jsParam);
            });
            $("#dplCITY_ID").change(function () {
                var _jsParam = new jsonRow();
                _jsParam.AddCell("ACTION", "dplCITY_ID_change");
                _jsParam.AddCell("CITY_ID", $(this).val());
                ajaxComm(_jsParam);
            });  
//            $.ploadFile("Tip", function (script, textStatus) {
//                $('#txtCONTACTS_EMAIL').poshytip({
//                    content: "<span style='font-weight:bold;' class='f14'>←请输入正确的邮箱地址</span>",
//                    //                    content: "请输入正确的邮箱地址！",
//                    //                    className: 'tip-green',
//                    showOn: 'none',
//                    alignTo: 'target',
//                    alignX: 'right',
//                    alignY: 'center',
//                    offsetX: 5,
//                    showTimeout: 100
//                });
//                $('#J_CheckCodeContainer').poshytip({
//                    content: "<span style='font-weight:bold;' class='f14'>←请照图中的数字输入验证码</span>",
//                    //                    content: "请输入正确的邮箱地址！",
//                    //                    className: 'tip-green',
//                    showOn: 'none',
//                    alignTo: 'target',
//                    alignX: 'right',
//                    alignY: 'center',
//                    offsetX: 5,
//                    showTimeout: 100
//                });
//                $('#txtCONTACTS_PHONE').poshytip({
//                    content: "<span style='font-weight:bold;' class='f14'>←填写手机号，可为空！</span>",
//                    showOn: 'none',
//                    alignTo: 'target',
//                    alignX: 'right',
//                    alignY: 'center',
//                    offsetX: 5,
//                    showTimeout: 100
//                });
//                $('#txtCOMM_TENANT_NME').poshytip({
//                    content: "<span style='font-weight:bold;' class='f14'>←允许5-16个字符，可用中文、数字、字母、下划线！</span>",
//                    showOn: 'none',
//                    alignTo: 'target',
//                    alignX: 'right',
//                    alignY: 'center',
//                    offsetX: 5,
//                    showTimeout: 100
//                });
//            });
//            $("#txtCONTACTS_EMAIL").blur(function () {
//                doValidateReg(this.id);
//            }).focus(function () {
//                $(this).poshytip('show');
//            });
//            $("#J_CheckCodeInput").blur(function () {
//                doValidateReg(this.id);
//            }).focus(function () {
//                $("#J_CheckCodeContainer").poshytip('show');
//            });
//            $("#txtCONTACTS_PHONE").blur(function () {
//                doValidateReg(this.id);
//            }).focus(function () {
//                $(this).poshytip('show');
//            });
//            $("#txtCOMM_TENANT_NME").blur(function () {
//                doValidateReg(this.id);
//            }).focus(function () {
//                $(this).poshytip('show');
//            });
            jQuery.getValidateImg('J_CheckCodeContainer');

            $("#J_BtnEmailForm").click(function () {
                if (getAllValiInp("divcustomer") && ($("#ckbCOMM_TYPE_CID_2").attr("checked") != "checked" || $("#ckbCOMM_TYPE_CID_2").attr("checked") == "checked" && getAllValiInp("divCompany"))) {
                    var _jsParam = new jsonRow();
                    GetFormJson("main-content", _jsParam);
                    _jsParam.AddCell("ACTION", "REGIST_STEP1"); 
                    _jsParam.AddCell("VALIDATE_CDE", $("#J_CheckCodeInput").val());
                    _jsParam.AddCell("ZONE_DESC", $("#dplPROVINCE_ID").find("option:selected").text() + " " + $("#dplCITY_ID").find("option:selected").text() + " " + $("#dplAREA_ID").find("option:selected").text());
                    ajaxComm(_jsParam);
                }
            });

            $("#ckbCOMM_TYPE_CID_1").change(function () {
                if (this.checked) {
                    $("#divCompany").hide();
                } else {
                    $("#divCompany").show();
                }
            });

            $("#ckbCOMM_TYPE_CID_2").change(function () {
                if (this.checked) {
                    $("#divCompany").show();
                } else {
                    $("#divCompany").hide();
                }
            });
            setAllValiInp();
        });
//        function doValidateReg(ctId) {
//            var blRight = true;
//            if (!ctId || ctId == "txtCONTACTS_EMAIL") {
//                var patten = new RegExp(/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+(com|cn)$/);
//                if (!patten.test($("#" + "txtCONTACTS_EMAIL").val())) {
//                    showValidateMsg("txtCONTACTS_EMAIL", "请输入正确的邮箱地址！", true);
//                    blRight = false;
//                } else {
//                    showValidateMsg("txtCONTACTS_EMAIL", "", false);
//                }
//            }
//            if (!ctId || ctId == "J_CheckCodeInput") {
//                $.ValidateImgCode($("#" + "J_CheckCodeInput").val(), function (rethtml) {
//                    if (!rethtml || rethtml != '1') {
//                        showValidateMsg("J_CheckCodeContainer", "请输入正确的验证码！", true);
//                        blRight = false;
//                    } else {
//                        showValidateMsg("J_CheckCodeContainer", "", false);
//                    }
//                });
//            }
//            if (!ctId || ctId == "txtCONTACTS_PHONE") {
//                var patten = new RegExp("^13[0-9]{1}[0-9]{8}$|^15[036789]{1}[0-9]{8}$|^18[89]{1}[0-9]{8}$");
//                if ($("#" + "txtCONTACTS_PHONE").val() && $("#" + "txtCONTACTS_PHONE").val() != '' && !patten.test($("#" + "txtCONTACTS_PHONE").val())) {
//                    showValidateMsg("txtCONTACTS_PHONE", "请输入正确的手机号！", true);
//                    blRight = false;
//                } else {
//                    showValidateMsg("txtCONTACTS_PHONE", "", false);
//                }
//            }
//            if (!ctId || ctId == "txtCOMM_TENANT_NME") {
//                var patten = new RegExp("^([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9_]){5,15}$");
//                if (!patten.test($("#" + "txtCOMM_TENANT_NME").val())) {
//                    showValidateMsg("txtCOMM_TENANT_NME", "允许5-16个字符，可用中文、数字、字母、下划线！", true);
//                    blRight = false;
//                } else {
//                    showValidateMsg("txtCOMM_TENANT_NME", "", false);
//                }
//            }
//            return blRight;
//        };
//        function showValidateMsg(msgId, msgtxt, blErr) {
//            if (blErr) {
//                $('#' + msgId).poshytip('update', "<span style='color:red;font-weight:bold;' class='f14'>" + msgtxt + "</span>").poshytip('show');
//            } else {
//                $('#' + msgId).poshytip('update', "<span style='color:blue;font-weight:bold;' class='f14'>√</span>").poshytip('show');
//            }
//        };
    </script>
</head>
<body>
    <div id="mallPage" class="tms-page mallAct tmall-  page-not-market">
        <!-- -->
        <!--商城通用顶通-->
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderTopHtml()%>
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderLogoHtml("会员中心")%>
        <div id="content" class="content" style=" padding-top: 3px;">
            <div class="page lang-zh-S">
                <div id="mytaobao-panel" class="grid-c2">
                    <div class="col-main" id="J_Col_Main" style="padding-bottom: 0;">
                        <div class="main-wrap">
                            <div id="main-content">
                            
                    <!-- BEGIN col-main -->
                    
		<div class="steps">
	<ol>
		<li class="active"><i>1</i><span class="tsl" >填写申请表</span></li>
		<li><i>2</i><span class="tsl" >上传证件图片</span></li>
		<li><i class="iconfont">3</i><span class="tsl" >信息审核</span></li>
	</ol>

			
	</div>
	
		<div class="form-list form-main-list">
			<form id="J_EmailForm" method="post" action="#"> 
				<div class="from-group">
						<div class="form-item">
							<span class="form-label form-label-b tsl">选择申请方式</span>
							<span class="tsl" ></span>
						</div>
					<div class="form-item">
						<span class="form-label tsl"></span>
						<div style=" font-size:16px; font-weight:bold;"> <input name="rdDealerType" id="ckbCOMM_TYPE_CID_1" value="1"  type="radio"/><label for="ckbCOMM_TYPE_CID_1"> 个人</label><span style="width:30px; margin-left:30px;"> </span>  <input name="rdDealerType" id="ckbCOMM_TYPE_CID_2" value="2" type="radio"/><label for="ckbCOMM_TYPE_CID_2"> 企业</label></div>
					</div>
				</div>
                <div id="divcustomer">
				<div class="from-group">
						<div class="form-item">
							<span class="form-label form-label-b tsl">店铺信息</span>
							<span class="tsl" >详细地址不需要重复填写市县信息</span>
						</div>
					<div class="form-item">
						<span class="form-label tsl" >店铺名称</span>
						<input class="form-text vali-inp" id="txtCOMM_TENANT_NME" name="email" type="text" value="" reg-exp="^([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9_]){5,15}$" right-msg="允许5-16个字符，可用中文、数字、字母、下划线！" />
					</div>
					<div class="form-item">
						<span class="form-label tsl" >商家所在区域</span>
                                        <table border="0" cellpadding="0" cellspacing="0"><tr><td><select name="dplPROVINCE_ID" id="dplPROVINCE_ID" class="comSel" style="width: 100px;">
                                        </select></td><td>
                                        -</td><td>
                                        <select name="dplCITY_ID" id="dplCITY_ID" class="comSel" style="width: 100px;">
                                        </select></td><td>
                                        -</td><td>
                                        <select name="dplAREA_ID" id="dplAREA_ID" class="comSel vali-inp" style="width: 100px;">
                                        </select></td></tr></table>
						<%--<input class="form-text" id="txtCONTACTS_ADDRESS" name="email" style="width:500px;" type="text" value=""  />--%>
					</div>
					<div class="form-item">
						<span class="form-label tsl" >商家详细地址</span> 
						<input class="form-text vali-inp" id="txtCONTACTS_ADDRESS" name="email" style="width:350px;" type="text" value=""  />
					</div>
				</div>
				<div class="from-group">
						<div class="form-item">
							<span class="form-label form-label-b tsl" >联系方式</span>
							<span class="tsl" ></span>
						</div>
					<div class="form-item">
						<span class="form-label tsl" >联系人</span>
						<input class="form-text vali-inp" id="txtCONTACTS" name="email" style="width:130px;" type="text" value=""  />
					</div>
					<div class="form-item">
						<span class="form-label tsl" >联系电话(座机)</span>
						<input class="form-text vali-inp" id="txtCONTACTS_TEL" name="email" style="width:180px;" type="text" value=""  />
					</div>
					<div class="form-item">
						<span class="form-label tsl" >联系电话(手机)</span>
						<input class="form-text vali-inp" id="txtCONTACTS_PHONE" name="email" style="width:180px;" type="text" value=""  reg-exp="^\s*$|^1[0-9]{10}$" right-msg="请填写11位数字" />
					</div> 
					<div class="form-item">
						<span class="form-label tsl" >E-Mail地址</span>
						<input class="form-text vali-inp" id="txtCONTACTS_EMAIL" name="email" style="width:200px;" type="text" value=""  reg-exp="^[\w-]+(\.[\w-]+)*@([\w-]+\.)+(com|cn|net)$" right-msg="请填写正确的邮箱地址" />
					</div>
				</div></div>
				<div class="from-group" id="divCompany" style="display:none;">
						<div class="form-item">
							<span class="form-label form-label-b tsl">企业信息</span>
							<span class="tsl" ></span>
						</div>
					<div class="form-item">
						<span class="form-label tsl" >公司中文名称</span>
						<input class="form-text vali-inp" id="txtCOMPANY_NME_CN" name="email" style="width:300px;" type="text" value=""  />
					</div>
					<div class="form-item">
						<span class="form-label tsl" >公司英文名称</span>
						<input class="form-text vali-inp" id="txtCOMPANY_NME_EN" name="email" style="width:300px;" type="text" value=""  />
					</div>
					<div class="form-item">
						<span class="form-label tsl" >法人代表</span>
						<input class="form-text vali-inp" id="txtLEGAL_OWNER" name="email" style="width:300px;" type="text" value=""  />
					</div>
					<div class="form-item">
						<span class="form-label tsl" >注册地址</span>
						<textarea class="form-text vali-inp" id="txtREGISTERED_ADDRESS" name="email" style="width:400px;" type="text" value=""  ></textarea>
					</div>
					<div class="form-item">
						<span class="form-label tsl" >注册时间</span>
						<input class="form-text vali-inp" id="txtREGISTERED_DT" name="email" style="width:400px;" type="text" value=""  onclick="laydate()" />
					</div>
					<div class="form-item">
						<span class="form-label tsl" >工商执照编号</span>
						<input class="form-text vali-inp" id="txtBUSINESS_LICENSE_NO" name="email" style="width:300px;" type="text" value=""  />
					</div>
					<div class="form-item">
						<span class="form-label tsl" >税务登记证号</span>
						<input class="form-text vali-inp" id="txtTAX_REGISTRATION_NO" name="email" style="width:300px;" type="text" value=""  />
					</div>
				</div>
				<div class="from-group">
							<div class="form-item form-item-checkcode">
						<span class="form-label form-label-b tsl" >验证码</span>
						<table border="0" cellpadding="0" cellspacing="0"><tr><td><input id="J_CheckCodeInput" name="imgChkcode" class="form-text checkcode-text vali-inp" type="text" value="" reg-targ="J_CheckCodeContainer" reg-exp="^[0-9]{4}$" right-msg="请填写正确的验证码"/></td>
						<td style=" padding:3px;"><div id="J_CheckCodeContainer" class="checkcode-container"  title="请输入验证码！"></div> </td></tr></table>
					</div>
				</div>
				<div class="form-group">
					<div class="form-item">
						<input class="form-checkbox" type="checkbox" name="" id="J_Agreement" checked="checked" />
						
<label for="J_Agreement" class="f12 tsl"  >
	同意<a href="/c_RegAgreement.htm" target="_blank">《优速购商家入驻协议》</a>
</label>

					</div>
					<div class="form-item form-item-short">
						<button type="button" class="btn btn-large tsl"  id="J_BtnEmailForm">下一步</button> 
					</div>
					</div>
				</form>
			</div>

                    <!-- end col-main -->
                            </div>
                        </div>
                    </div>
                    <div class="col-sub" id="J_Col_Sub">
                        <%=new msBsc.WebUi.Code.QtHtmlGet().GetCustomMenu()%>
                    </div>
                </div>
                <!-- end mytaobao-panel -->
            </div>
        </div>
        
        <div style="height: 15px; clear: both;">
        </div>

        <%=new msBsc.WebUi.Code.QtHtmlGet().GetFloorHtml()%>
    </div>
</body>
</html>
